//
// Decompiled by Jadx - 395ms
//
package a;

import a.i;
import java.util.Date;
import x.c;
import x.d;

public class i$b extends i.a {
    public final d d;
    public final String e;

    /* JADX WARN: Illegal instructions before constructor call */
    /* JADX WARN: Multi-variable type inference failed */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public i$b(d dVar, String str, Object obj) {
        super(obj);
        int i;
        if (obj != null && obj.getClass().isArray()) {
            throw new c("Illegal value: found array, but simple object required");
        }
        Class cls = dVar.b;
        if (cls == Date.class) {
            if (obj instanceof Date) {
                obj = Long.valueOf(((Date) obj).getTime());
            } else if (!(obj instanceof Long)) {
                throw new c("Illegal date value: expected java.util.Date or Long for value " + obj);
            }
        } else if (cls == Boolean.TYPE || cls == Boolean.class) {
            if (obj instanceof Boolean) {
                i = ((Boolean) obj).booleanValue();
            } else if (obj instanceof Number) {
                int intValue = ((Number) obj).intValue();
                if (intValue != 0 && intValue != 1) {
                    throw new c("Illegal boolean value: numbers must be 0 or 1, but was " + obj);
                }
            } else if (obj instanceof String) {
                String str2 = (String) obj;
                if ("TRUE".equalsIgnoreCase(str2)) {
                    obj = 1;
                } else if ("FALSE".equalsIgnoreCase(str2)) {
                    i = 0;
                } else {
                    throw new c("Illegal boolean value: Strings must be \"TRUE\" or \"FALSE\" (case insensitive), but was " + obj);
                }
            }
            obj = Integer.valueOf(i);
        }
        this.d = dVar;
        this.e = str;
    }

    public final void b(StringBuilder sb) {
        int i = g.d.a;
        sb.append("T");
        sb.append('.');
        sb.append('\"');
        sb.append(this.d.e);
        sb.append('\"');
        sb.append(this.e);
    }
}
